package org.wesc.boot.dao.entity;

import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.wesc.boot.common.easyexcel.LongToStringConverter;

import java.io.Serializable;

/**
 * <p>
 * 
 * </p>
 *
 * @author Wesley
 * @since 2019-12-09
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("sys_dict")
public class Dict extends Model<Dict> {

    private static final long serialVersionUID = 1L;

    /**
     * 字典ID
     */
    @TableId(value = "DICT_ID", type = IdType.AUTO)
    @ExcelProperty(value = {"字典ID"}, index = 0, converter = LongToStringConverter.class)
    @ColumnWidth(15)
    private Long dictId;

    /**
     * 键
     */
    @ExcelProperty(value = {"键"}, index = 1, converter = LongToStringConverter.class)
    @ColumnWidth(10)
    private Long keyy;

    /**
     * 值
     */
    @ExcelProperty(value = {"值"}, index = 2)
    @ColumnWidth(10)
    private String valuee;

    /**
     * 字段名称
     */
    @ExcelProperty(value = {"字段"}, index = 3)
    @ColumnWidth(15)
    private String fieldName;

    /**
     * 表名
     */
    @ExcelProperty(value = {"表名"}, index = 4)
    @ColumnWidth(15)
    private String tableName;


    public static final String DICT_ID = "DICT_ID";

    public static final String KEYY = "KEYY";

    public static final String VALUEE = "VALUEE";

    public static final String FIELD_NAME = "FIELD_NAME";

    public static final String TABLE_NAME = "TABLE_NAME";

    @Override
    protected Serializable pkVal() {
        return this.dictId;
    }

}
